package natappvip.liujinliang.model;

import java.text.SimpleDateFormat;

/**
 * @ClassName:  FileEle   
 * @Despt: 文件的存储信息实体类 
 * @Auth: Liujinliang 
 * @Date: 2018年7月24日 下午10:48:59
 */
public class FileEle {

	/*
	 * 文件唯一标识
	 */
	private String uuid;
	
	/*
	 * 文件大小
	 */
	private long size;
	
	/*
	 * 是否被删除
	 */
	private int existed;
	
	/*
	 * 文件创建时间
	 */
	private String createTime;
	
	/* 创建日期格式 */
	private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

	public FileEle() {
	}

	public FileEle(String uuid, long size, String createTime) {
		this.uuid = uuid;
		this.size = size;
		this.createTime = createTime;
		this.existed = 1;	// 默认文件是存在的
	}
	
	public void set(String uuid, long size, String createTime, int existed) {
		this.uuid = uuid;
		this.size = size;
		this.existed = existed;
		this.createTime = createTime;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public long getSize() {
		return size;
	}

	public void setSize(long size) {
		this.size = size;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public SimpleDateFormat getSdf() {
		return sdf;
	}

	public void setSdf(SimpleDateFormat sdf) {
		this.sdf = sdf;
	}
	
	public int getExisted() {
		return existed;
	}

	public void setExisted(int existed) {
		this.existed = existed;
	}

	@Override
	public String toString() {
		return "uuid:" + uuid + ", size:" + size + ", createTime:" + createTime + ", existed:" + (existed == 0 ? "已删除" : "未删除");
	}
}
